curl --request GET \
--url 'https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/ws/{automationPath}*' \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/ws/{automationPath}*', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/ws/{automationPath}*"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)Open a WebSocket on a `when.ws` trigger
WebSocket upgrade. The credential comes from the Authorization header (Bearer), the token sub-protocol openai-insecure-api-key.<token> (browsers, which cannot set the header; realtime is accepted alongside it) or the access-token cookie, never from the query string. The cookie only counts from a page the api-gateway CORS rule allows. The native module named by the trigger handles the connection. A runtime replica that is full, a workspace past its share of the connections, or a module turned off accept the connection, send an error event (code too_many_connections, workspace_share_reached or module_disabled) and close it with 1013 (Try Again Later): a browser never sees the HTTP status of a refused upgrade.
curl --request GET \
--url 'https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/ws/{automationPath}*' \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/ws/{automationPath}*', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/ws/{automationPath}*"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The path declared in when.ws.path, with its parameters (e.g. v1/agents/agent_x). Can contain slashes.
Query Parameters
Active organization of the connection: its governance applies, and it pays
128voice module: ISO-639-1 language of the user speech
16voice module: conversation to resume (contextId), a new one otherwise
128voice module: speech rate of the answers, a multiplier of the voice's own (0.5 to 2)
8Response
Switching protocols (also for a connection turned away with 1013, see above)
Was this page helpful?